VectorImage AddPolyline
Add an PolylineShape to the VectorImage
Overloads
public void AddPolyline(IEnumerable<Point3D> vertices) |
public void AddPolyline(PolylineShape polylineShape) |
Return value
void |
Parameters
IEnumerable<Point3D> | vertices | list of vertices which describes the polyline |
PolylineShape | polylineShape | A PolylineShape object |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
IList<Point3D> pl1 = new List<Point3D>();
pl1.Add(new Point3D(-15, -45, 0));
pl1.Add(new Point3D(-15, 15, 0));
pl1.Add(new Point3D(-35, 15, 0));
pl1.Add(new Point3D(0, 60, 0));
pl1.Add(new Point3D(35, 15, 0));
pl1.Add(new Point3D(15, 15, 0));
pl1.Add(new Point3D(15, -45, 0));
//NO OVERLOAD WITH BOOLEAN CLOSED
vectorImage.AddPolyline(pl1);
IList<Point3D> pl2 = new List<Point3D>();
pl2.Add(new Point3D(-10, -40, 0));
pl2.Add(new Point3D(-10, 10, 0));
pl2.Add(new Point3D(-30, 10, 0));
pl2.Add(new Point3D(0, 50, 0));
pl2.Add(new Point3D(30, 10, 0));
pl2.Add(new Point3D(10, 10, 0));
pl2.Add(new Point3D(10, -40, 0));
vectorImage.AddPolyline(pl2);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch
{
}
}